from enum import IntEnum

class TimeUnit(IntEnum):
    MINUTE = 0  # 分钟
    HOUR = 1    # 小时
    DAY = 2     # 天
    MONTH = 3   # 月
    YEAR = 4    # 年

    def __str__(self):
        names = {
            TimeUnit.MINUTE: "分钟",
            TimeUnit.HOUR: "小时",
            TimeUnit.DAY: "天",
            TimeUnit.MONTH: "月",
            TimeUnit.YEAR: "年",
        }
        return names.get(self, "未知单位")
